package com.bss.model;

// Generated Oct 27, 2011 10:37:49 PM by Hibernate Tools 3.3.0.GA

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.bss.AbstractEntity;

/**
 * Revenue generated by hbm2java
 */
@Entity
@Table(name = "revenue")
public class Revenue extends AbstractEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5044734019240618203L;
	private int id;
	private RevenueHead revenueHead;
	private Date dateOfIncome;
	private Integer amount;

	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Integer getId() {
		return this.id;
	}

	@Override
	public void setId(final int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idRevenueHead")
	public RevenueHead getRevenueHead() {
		return this.revenueHead;
	}

	public void setRevenueHead(final RevenueHead revenuehead) {
		this.revenueHead = revenuehead;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "dateOfIncome", length = 19)
	public Date getDateOfIncome() {
		return this.dateOfIncome;
	}

	public void setDateOfIncome(final Date dateOfIncome) {
		this.dateOfIncome = dateOfIncome;
	}

	@Column(name = "amount")
	public Integer getAmount() {
		return this.amount;
	}

	public void setAmount(final Integer amount) {
		this.amount = amount;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "date", length = 19)
	public Date getDate() {
		return this.date;
	}
}
